// import { useState } from 'react'
// import reactLogo from './assets/react.svg'
// import viteLogo from '/vite.svg'
import './App.scss'
import { router } from '@/router/createRouteConfig';
import { useNavigate, useRoutes } from 'react-router-dom';
import useLocationChange from '@/router/useLocationChange';
import routerListener from '@/router/routerListioner';
import './styles/index.css'

function App() {

  const elements = useRoutes(router);
  const navigate = useNavigate();

  useLocationChange((to, from) => {
    routerListener(navigate, to, from)
  })

  return elements;
}

export default App
